<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
    <div class="main">
        <div class="sidebar index_sidebar">
            <div class="menu_wrap">
                <!--menu-->
                <div class="menu">
                    <div class="menu_title"><?php echo $category[0][0][lang('field_category_title')];?></div>
                    <ul>
                    <?php foreach ($menu as $m){?>
                        <li>
                        <a href="<?php echo site_url($m['uri'].'/'.$m['id']);?>"><?php echo $m[lang('field_content_title')];?></a>
                        </li>             
                    <?php }?>
                    </ul>
                </div>
            </div>
            <div class="contact_wrap">
                <div class="contact">
                <!--side contact start-->
                <?php echo ${lang('field_side_contact')};?>
                <!--side contact end-->
                </div>
            </div>
        </div>
        <div class="mainbody index_mainbody">
            <div class="profile">
                <?php echo ${lang('field_home_intro')};?>
            </div>
            <div class="news_list index_news_list">
                <div class="news_list_title"><?php echo lang('page_recommend_news');?></div>
                <ul>
                <?php foreach ($flag_news as $news){?>    
                <li><a href="<?php echo site_url($news['uri'].'/'.$news['id']);?>"><?php echo $news[lang('field_content_title')];?></a><span><?php echo date('m/d',$news['add_time']);?></span></li>
                <?php }?>
                </ul>
            </div>
            <div class="product_list index_product_list">
                <div class="product_list_title"><?php echo lang('page_recommend_product');?></div>
                <div class="product_lidt_frame" id="product_lidt_frame">
                    <ul>
                    <?php foreach ($flag_product as $pro){?>    
                    <li>
                        <div class="product_list_item">
                            <a class="product_list_item_img" href="<?php echo site_url($pro['uri'].'/'.$pro['id']);?>" src="<?php echo thumb_path($pro['img_cover'],160,120);?>" style=" width:160px; height:120px;"></a>
                            <div class="product_list_item_info">
                                <a href="<?php echo site_url($pro['uri'].'/'.$pro['id']);?>"><?php echo $pro[lang('field_content_title')];?></a><span>￥<?php echo $pro['price'];?></span>                  
                            </div>
                        </div>
                    </li>
                    <?php }?>
                    </ul>
                </div>
                <script type="text/javascript">
                    ScrollLeft('product_lidt_frame');
                </script>
            </div>
            <div class="links">
                <div class="links_title"><?php echo lang('page_recommend_friend');?></div>
                <ul>
                    <?php foreach ($links as $link){?>
                    <li><a <?php echo $link['target']?'target="_blank"':'';?> href="<?php echo $link['uri'];?>"><?php echo $link[lang('field_links_title')];?></a></li>
                    <?php }?>
                </ul>
            </div>
        </div>
        <div class="clearFloat"></div>
    </div>